﻿@model FTBS.Models.Entities.User
@{
    ViewBag.Title = "Đăng ký thành viên";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<style>
    
    .text-box {
        background: white;
        border: 1px solid #ffa853;
        box-shadow: 0 0 1px 1px #ffa853;
        color: #666;
        outline: none;
        height: 30px;
        width: 200px;
    }

    #Password {
        background: white;
        border: 1px solid #ffa853;
        box-shadow: 0 0 1px 1px #ffa853;
        color: #666;
        outline: none;
    }

    #Gender {
        background: white;
        border: 1px solid #ffa853;
        box-shadow: 0 0 1px 1px #ffa853;
        color: #666;
        outline: none;
    }
</style>
<div style="background-color: white;min-height: 473px">
    <h2 style="text-align: center; font-weight: bold">Đăng ký thành viên</h2>
    <div style="text-align: center">(*) là thông tin bắt buộc</div>
    <div align="center">
        @using (Html.BeginForm("Register", "Customer", null, FormMethod.Post,
                              new { enctype = "multipart/form-data" }))
        {
            @Html.ValidationSummary(true)
            <table class="table bordered" style="margin: 0px 0px 0px 40px;background-color: lightyellow; width: 600px;text-align: left">
                <tr>
                    <th>Tên đăng nhập (*)
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.EditorFor(model => model.UserName)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.UserName)</p>
                            @if (ViewBag.UserName != null)
                            {
                                <p style="color: red; font-size: 10pt">Tên đăng nhập này đã được sử dụng!</p>
                            }
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Mật khẩu (*)
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.PasswordFor(model => model.Password)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Password)</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Họ tên  (*)
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.EditorFor(model => model.FullName)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.FullName)</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Giới tính
                    </th>
                    <td>
                        <div class="input-control select">
                            @Html.DropDownListFor(model => model.Gender, (SelectList)ViewBag.Gender)
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Tuổi
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.EditorFor(model => model.Age)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Age)</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Địa chỉ (*)
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.EditorFor(model => model.Address)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Address)</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Email (*)
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.EditorFor(model => model.Email)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Email)</p>
                            @if (ViewBag.Email != null)
                            {
                                <p style="color: red; font-size: 10pt">Email này đã được sử dụng!</p>
                            }
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>Số điện thoại (*)
                    </th>
                    <td>
                        <div class="input-control text">
                            @Html.EditorFor(model => model.PhoneNumber)
                            <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.PhoneNumber)</p>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <input class="large info" type="submit" value="Hoàn tất đăng ký" />
                    </td>
                </tr>
            </table>
        }
    </div>
</div>
